import { UserLayout, TabLayout, RouteView, BlankLayout, PageView } from '@/components/layouts'

/**
 * 走菜单，走权限控制
 * @type {[null,null]}
 */
export const asyncRouterMap = [

  {
    path: '/',
    name: 'materical',
    component: TabLayout,
    meta: { title: '管理项目' },
    //redirect: '/dashboard/analysis',
    // redirect:'/materical/material_add',
    children: [

    ]
  },
  {
    path: '*', redirect: '/404', hidden: true
  }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/user',
    component: UserLayout,
    redirect: '/user/login',
    hidden: true,
    children: [
      {
        path: 'login',
        name: 'login',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
      },
      {
        path: 'register',
        name: 'register',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
      }
    ]
  },
   {
    path: '/material',
    component: TabLayout,
    // redirect: '/material/Material_add',
    // children: [
    //   {
    //     path: 'Material_add',
    //     name: 'Material_add',
    //     meta: { title: '管理项目' },
    //     component: () => import(/* webpackChunkName: "dashboard" */ '@/views/material/MaterialAdd')
    //   }
    // ]
  },
  // {
  //   path: '/dashboard',
  //   component: TabLayout,
  //   redirect: '/dashboard/analysis',
  //   children: [
  //     {
  //       path: 'analysis',
  //       name: 'analysis',
  //       meta: { title: '首页' },
  //       component: () => import(/* webpackChunkName: "dashboard" */ '@/views/dashboard/Analysis')
  //     }
  //   ]
  // },
  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  },

]
